﻿@model SRF.Admin.Models.DictionaryItem
@{
    Layout = "~/Views/Shared/_EditDialog.cshtml";  
}
@using SRF.UI.Html
@section header{
    <script type="text/javascript" language="javascript">
        function onComplete() {
            $.dialog.close("ok");
        }
        function onDialogClose(msg) {
            $.ajaxSubmit();
        } 
    </script>
}
@using (Ajax.BeginForm("ItemEdit", null, new AjaxOptions() { HttpMethod = "Post", OnComplete = "onComplete" }, new { @class = "form-horizontal" }))
{   
    @Html.HiddenFor(m => m.Id)
    @Html.HiddenFor(m => m.DictionaryId)
    <table>
        <tr>
            <td>
                <label class="control-label" for="Text">
                    名称:</label>
                @Html.TextBoxFor(m => m.Text)
            </td>
            <td>
                <label class="control-label" for="Code">
                    编码:</label>
                @Html.TextBoxFor(m => m.Code)
            </td>
        </tr>
        <tr>
            <td>
                <label class="control-label" for="Rank">
                    排序 :</label>
                @Html.TextBoxFor(m => m.Rank,new { @class = "textbox-smaller",maxlength="3" })
            </td>
            <td>
                <label class="control-label" for="Enabled">
                    有效 :</label>
                <label class="checkbox inline">
                    @Html.CheckBoxFor(m => m.Enabled)
                </label>
            </td>
        </tr>
        <tr>
            <td colspan="2">
                <label class="control-label" for="Remark">
                    描述:</label>
                @Html.TextBoxFor(m => m.Remark, new { @class = "textbox-larger" })
            </td>
        </tr>
    </table>
}